import org.testng.Assert;
import org.testng.annotations.Test;

import static org.testng.Assert.*;

public class ShapeAreaCalculatorTest {


    @Test
    public void testSquareArea() {Assert.assertEquals(ShapeAreaCalculator.squareArea(5), 25.0, "正⽅形⾯积计算错误。");
    }

    @Test
    public void testCircleArea() {Assert.assertEquals(ShapeAreaCalculator.circleArea(1), Math.PI, 0.001,
            "圆形⾯积计算错误。");
    }

    @Test
    public void testTriangleArea() {Assert.assertEquals(ShapeAreaCalculator.triangleArea(3, 4, 5), 6.0,
            0.001, "三⻆形⾯积计算错误。");

    }

    @Test
    public void testTrapezoidArea() {
        Assert.assertEquals(ShapeAreaCalculator.trapezoidArea(2, 3, 4), 10.0,
            0.001, "梯形⾯积计算错误。");

    }
}